<template>
  <el-descriptions :title="'任务详情'" :column="1" border>
    <el-descriptions-item label="任务名称">{{ taskData.taskName }}</el-descriptions-item>
    <el-descriptions-item label="任务来源">{{ taskData.source }}</el-descriptions-item>
    <el-descriptions-item label="是否完成">{{ taskData.status ? '是' : '否' }}</el-descriptions-item>
    <el-descriptions-item label="创建时间">{{ formatDateTime(taskData.createTime) }}</el-descriptions-item>
    <el-descriptions-item label="更新时间">{{ formatDateTime(taskData.updateTime) }}</el-descriptions-item>
    <el-descriptions-item label="备注列表">
      <div v-for="(remark, index) in taskData.remarkAsList" :key="index">
        {{ remark }}
      </div>
    </el-descriptions-item>
  </el-descriptions>
</template>

<script setup>
import { formatDateTime } from '../utils/dateUtils.js';

defineProps({
  taskData: {
    type: Object,
    required: true
  }
});
</script>